<!DOCTYPE html>
<!--
 (c) 2013 Rob Wu <rob@robwu.nl>
 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at http://mozilla.org/MPL/2.0/.

//#expand Revision __VERSION__
 -->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; connect-src https: http: data: blob:">
<title>CRX Viewer</title>
<link rel="stylesheet" type="text/css" href="crxviewer.css">
<link rel="stylesheet" type="text/css" href="lib/prettify/prettify.css">
</head>
<body>
<div id="top-bar">
    <form>
        <input type="text" id="file-filter" placeholder="filter (regex) ! file search"
title="File filter (case-insensitive). Formats:
1. [filename filter regexp]
2. [filename filter regexp]!file content search term (case-insensitive)
3. [filename filter regexp]!case:file content search term (case-sensitive)
4. [filename filter regexp]!regexp:filter content regexp (case-sensitive)
5. [filename filter regexp]!iregexp:filter content regexp (case-insensitive)
The filename filter is optional, '!search term' can also be used directly to search in all files.
" list="file-filter-patterns">
        <label title="Filter: Images">
            <input type="checkbox" data-filter-type="images">
            <span class="filter-label-description">Images</span>
            <span class="gcount"></span>
        </label>
        <label title="Filter: JavaScript code">
            <input type="checkbox" data-filter-type="code">
            <span class="filter-label-description">Code</span>
            <span class="gcount"></span>
        </label>
        <label title="Filter: HTML, CSS">
            <input type="checkbox" data-filter-type="markup">
            <span class="filter-label-description">Markup</span>
            <span class="gcount"></span>
        </label>
        <label title="Filter: Translations used by chrome.i18n">
            <input type="checkbox" data-filter-type="locales">
            <span class="filter-label-description">Locales</span>
            <span class="gcount"></span>
        </label>
        <label title="Filter: Other files">
            <input type="checkbox" data-filter-type="misc">
            <span class="filter-label-description">Misc</span>
            <span class="gcount"></span>
        </label>
    </form>
    <span id="file-filter-feedback"></span>
    <a id="webstore-link">Listing</a>
    <a id="download-link">Download</a>
    <a id="download-link-crx">CRX</a>
    <a id="open-crxviewer">Open</a>
</div>
<div id="advanced-open">
    <form id="advanced-open-form">
        Enter the URL of a Chrome Extension, Firefox addon, zip file,
        or the page in the Chrome Web Store, Firefox addon gallery or Opera addon gallery.
        <input type="url" placeholder="URL of Chrome extension, Firefox addon or zip file">
        <input type="submit" value="Open in this viewer">
        or select a local file &rarr;
        <input type="file">
    </form>
    <form id="advanced-open-cws-extension" class="site-specific-form">
        <h3>Generate or modify URL of Chrome Web Store item</h3>
        <div title="Extension ID. This is the 32-character word in a Chrome Web Store URL">
            <span class="labeltext">Extension ID</span>
            <input type="text" pattern="[a-p]{32}" name="xid" placeholder="32-characters, a-p" required>
        </div>
        <div>
            <span class="labeltext">Operating system</span>
            <label><input type="radio" name="os" value="win"    > Windows</label>
            <label><input type="radio" name="os" value="linux"  > Linux</label>
            <label><input type="radio" name="os" value="mac"    > macOS</label>
            <label><input type="radio" name="os" value="cros"   > Chrome OS</label>
            <label><input type="radio" name="os" value="openbsd"> BSD</label>
            <label><input type="radio" name="os" value="android"> Android</label>
        </div>
        <div>
            <span class="labeltext">Architecture</span>
            <label><input type="radio" name="arch" value="arm"   > ARM</label>
            <label><input type="radio" name="arch" value="x86-64"> x86-64</label>
            <label><input type="radio" name="arch" value="x86-32"> x86-32</label>
        </div>
        <div title="NativeClient architecture">
            <span class="labeltext">NaCl architecture</span>
            <label><input type="radio" name="nacl_arch" value="arm"   > ARM</label>
            <label><input type="radio" name="nacl_arch" value="x86-64"> x86-64</label>
            <label><input type="radio" name="nacl_arch" value="x86-32"> x86-32</label>
            <!-- Maybe also "mips32"? -->
        </div>
        <div title="Version of Chrome browser. The Chrome Webstore may reject versions that are too old.">
            <span class="labeltext">Chrome version</span>
            <input type="text" pattern="[0-9]{1,5}(\.[0-9]{1,5}){3}" name="prodversion">
        </div>
        <div class="submit-if-valid" hidden>
            <input type="submit" value="View extension source in this viewer">
            <a href="">Link to listing in the Chrome web store</a>
        </div>
    </form>
    <form id="advanced-open-amo-extension" class="site-specific-form">
        <h3>Find XPI files of Firefox add-ons at AMO</h3>
        <div title="Add-on slug (from the URL) or add-on ID (GUID or ID containing @)">
            <span class="labeltext">Add-on slug or ID</span>
            <input type="text" pattern="[^/]+" name="amoslugorid" placeholder="slug from AMO URL or ID add-on" required>
            <input type="submit" value="Search on AMO">
        </div>
        <div>
            <div class="amodescription"></div>
            <ul class="amoxpilist"></ul>
        </div>
    </form>
</div>
<div id="left-panel">
    <div class="content">
        <ol id="file-list"></ol>
        <div class="total-size-wrapper" hidden>
            +
            <span id="total-size"></span>
        </div>
    </div>
</div>
<div id="right-panel">
    <div id="source-toolbar"></div>
    <div id="source-code">
        <div id="initial-status"></div>
    </div>
</div>
<footer>
    Source code and support at <a href="https://github.com/Rob--W/crxviewer">https://github.com/Rob--W/crxviewer</a>,
    provided by <a href="https://robwu.nl">Rob Wu</a>.
</footer>
<datalist id="file-filter-patterns">
    <option value="\.js$" label="JavaScript">
    <option value="\.css$" label="CSS">
    <option value="\.html?$" label="HTML">
    <option value="\.(js|css|html)$" label="JS / CSS / HTML">
    <option value="!chrome." label="Files containing chrome.">
    <option value="!regexp:(chrome|browser)\." label="Regexp file search">
    <option value="\.html$!http:" label="All HTML files containing http:.">
</datalist>
<!--#if CHROME || OPERA || FIREFOX-->
<script src="storage-sync-polyfill.js"></script>
<!--#endif-->
<!--#if FIREFOX-->
<script src="domain-fronter.js"></script>
<!--#endif-->
<script src="lib/zip.js/zip.js"></script>
<script src="lib/zip.js/mime-types.js"></script>
<script src="lib/efficienttextwriter.js"></script>
<script src="lib/uint8arraywriter.js"></script>
<script src="lib/crx-to-zip.js"></script>
<script src="chrome-platform-info.js"></script>
<script src="cws_pattern.js"></script>
<script src="lib/beautify/beautify.js"></script>
<script src="lib/beautify/minify.json.js"></script>
<script src="lib/prettify/prism.js" data-manual></script>
<script src="lib/prettify/prism-source-extensions.js"></script>
<script src="lib/sha256.js"></script>
<script src="lib/spark-md5.min.js"></script>
<script src="lib/modern-crypto.js"></script>
<script src="search-tools.js"></script>
<script src="asn1lite.js"></script>
<script src="mozcose.js"></script>
<script src="crxviewer.js"></script>
</body>
</html>
